//
//  NSAttributedString.DocumentReadingOptionKey.swift
//  Documentation
//
//  Created by Toj on 3/5/24.
//

import Foundation

extension NSAttributedString.DocumentReadingOptionKey {

    /// 指定要读取的文档类型, 对应的值是一个 NSAttributedString.DocumentType 枚举.
    public static let documentType: NSAttributedString.DocumentReadingOptionKey
    
    /// 指定默认的文本属性字典, 对应的值是一个 NSDictionary 对象, 表示在加载文本时应用的默认属性.
    public static let defaultAttributes: NSAttributedString.DocumentReadingOptionKey
    
    /// 指定字符编码, 对应的值是一个 NSNumber 对象, 表示字符编码的整数值.
    public static let characterEncoding: NSAttributedString.DocumentReadingOptionKey // @"CharacterEncoding", for plain text and HTML; NSNumber containing integer specifying NSStringEncoding to be used to interpret the file

    
    @available(iOS 13.0, *)
    public static let targetTextScaling: NSAttributedString.DocumentReadingOptionKey // @"TargetTextScaling", one of the text scaling types declared above.  Only affects RTF documents.  For reading methods, you can pass this option to request that the returned attributed string uses the specified scaling.  The font point sizes in the document may be converted if necessary.  If this option is not provided, the system will deduce the target text scaling type based on application framework and platform.

    
    @available(iOS 13.0, *)
    public static let sourceTextScaling: NSAttributedString.DocumentReadingOptionKey // @"SourceTextScaling", one of the text scaling types declared above.  Only affects RTF documents.  For reading methods, you can pass this option to indicate the source text scaling type of the RTF document being read.  Use this in conjunction with NSTargetTextScalingDocumentOption to control text scaling conversions on the font point sizes in the returned attributed string.  This option does nothing unless NSTargetTextScalingDocumentOption is also specified.  If this option is not provided, the system will deduce the source text scaling type based on the information in the document.
}
